3.327 \(\int \tan ^2(c+d x) (a+i a \tan (c+d x))^m \, dx\)

Optimal. Leaf size=82 \[ \frac{i (a+i a \tan (c+d x))^m \, _2F_1\left (1,m;m+1;\frac{1}{2} (i \tan (c+d x)+1)\right )}{2 d m}-\frac{i (a+i a \tan (c+d x))^{m+1}}{a d (m+1)} \]

[Out]

((I/2)*Hypergeometric2F1[1, m, 1 + m, (1 + I*Tan[c + d*x])/2]*(a + I*a*Tan[c + d*x])^m)/(d*m) - (I*(a + I*a*Ta
n[c + d*x])^(1 + m))/(a*d*(1 + m))

________________________________________________________________________________________

Rubi [A]  time = 0.0696865, antiderivative size = 82, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 24, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.125, Rules used = {3543, 3481, 68} \[ \frac{i (a+i a \tan (c+d x))^m \, _2F_1\left (1,m;m+1;\frac{1}{2} (i \tan (c+d x)+1)\right )}{2 d m}-\frac{i (a+i a \tan (c+d x))^{m+1}}{a d (m+1)} \]

Antiderivative was successfully verified.

[In]

Int[Tan[c + d*x]^2*(a + I*a*Tan[c + d*x])^m,x]

[Out]

((I/2)*Hypergeometric2F1[1, m, 1 + m, (1 + I*Tan[c + d*x])/2]*(a + I*a*Tan[c + d*x])^m)/(d*m) - (I*(a + I*a*Ta
n[c + d*x])^(1 + m))/(a*d*(1 + m))

Rule 3543

Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^2, x_Symbol] :> Simp[
(d^2*(a + b*Tan[e + f*x])^(m + 1))/(b*f*(m + 1)), x] + Int[(a + b*Tan[e + f*x])^m*Simp[c^2 - d^2 + 2*c*d*Tan[e
 + f*x], x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && NeQ[b*c - a*d, 0] &&  !LeQ[m, -1] &&  !(EqQ[m, 2] && EqQ
[a, 0])

Rule 3481

Int[((a_) + (b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> -Dist[b/d, Subst[Int[(a + x)^(n - 1)/(a - x), x]
, x, b*Tan[c + d*x]], x] /; FreeQ[{a, b, c, d, n}, x] && EqQ[a^2 + b^2, 0]

Rule 68

Int[((a_) + (b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[((b*c - a*d)^n*(a + b*x)^(m + 1)*Hype
rgeometric2F1[-n, m + 1, m + 2, -((d*(a + b*x))/(b*c - a*d))])/(b^(n + 1)*(m + 1)), x] /; FreeQ[{a, b, c, d, m
}, x] && NeQ[b*c - a*d, 0] &&  !IntegerQ[m] && IntegerQ[n]

Rubi steps

\begin{align*} \int \tan ^2(c+d x) (a+i a \tan (c+d x))^m \, dx &=-\frac{i (a+i a \tan (c+d x))^{1+m}}{a d (1+m)}-\int (a+i a \tan (c+d x))^m \, dx\\ &=-\frac{i (a+i a \tan (c+d x))^{1+m}}{a d (1+m)}+\frac{(i a) \operatorname{Subst}\left (\int \frac{(a+x)^{-1+m}}{a-x} \, dx,x,i a \tan (c+d x)\right )}{d}\\ &=\frac{i \, _2F_1\left (1,m;1+m;\frac{1}{2} (1+i \tan (c+d x))\right ) (a+i a \tan (c+d x))^m}{2 d m}-\frac{i (a+i a \tan (c+d x))^{1+m}}{a d (1+m)}\\ \end{align*}

Mathematica [F]  time = 16.4836, size = 0, normalized size = 0. \[ \int \tan ^2(c+d x) (a+i a \tan (c+d x))^m \, dx \]

Verification is Not applicable to the result.

[In]

Integrate[Tan[c + d*x]^2*(a + I*a*Tan[c + d*x])^m,x]

[Out]

Integrate[Tan[c + d*x]^2*(a + I*a*Tan[c + d*x])^m, x]

________________________________________________________________________________________

Maple [F]  time = 0.43, size = 0, normalized size = 0. \begin{align*} \int \left ( \tan \left ( dx+c \right ) \right ) ^{2} \left ( a+ia\tan \left ( dx+c \right ) \right ) ^{m}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tan(d*x+c)^2*(a+I*a*tan(d*x+c))^m,x)

[Out]

int(tan(d*x+c)^2*(a+I*a*tan(d*x+c))^m,x)

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (i \, a \tan \left (d x + c\right ) + a\right )}^{m} \tan \left (d x + c\right )^{2}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)^2*(a+I*a*tan(d*x+c))^m,x, algorithm="maxima")

[Out]

integrate((I*a*tan(d*x + c) + a)^m*tan(d*x + c)^2, x)

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (-\frac{\left (\frac{2 \, a e^{\left (2 i \, d x + 2 i \, c\right )}}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}\right )^{m}{\left (e^{\left (4 i \, d x + 4 i \, c\right )} - 2 \, e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right )}}{e^{\left (4 i \, d x + 4 i \, c\right )} + 2 \, e^{\left (2 i \, d x + 2 i \, c\right )} + 1}, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)^2*(a+I*a*tan(d*x+c))^m,x, algorithm="fricas")

[Out]

integral(-(2*a*e^(2*I*d*x + 2*I*c)/(e^(2*I*d*x + 2*I*c) + 1))^m*(e^(4*I*d*x + 4*I*c) - 2*e^(2*I*d*x + 2*I*c) +
 1)/(e^(4*I*d*x + 4*I*c) + 2*e^(2*I*d*x + 2*I*c) + 1), x)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (a \left (i \tan{\left (c + d x \right )} + 1\right )\right )^{m} \tan ^{2}{\left (c + d x \right )}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)**2*(a+I*a*tan(d*x+c))**m,x)

[Out]

Integral((a*(I*tan(c + d*x) + 1))**m*tan(c + d*x)**2, x)

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (i \, a \tan \left (d x + c\right ) + a\right )}^{m} \tan \left (d x + c\right )^{2}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)^2*(a+I*a*tan(d*x+c))^m,x, algorithm="giac")

[Out]

integrate((I*a*tan(d*x + c) + a)^m*tan(d*x + c)^2, x)